<!-- xml version="1.0" encoding="utf-8" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
	<title>The Self-Instruction Latin Classic</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<link href="flashcard.css" rel="stylesheet" type="text/css">
</head>
<script type="text/javascript">
var sentences = [
  ['VACCA ET CAPELLA, OVIS ET LEO', 'vacca -ae, <span class="etype">f.</span><br />capella -ae, <span class="etype">f.</span> [caper, <span class="def">he-goat</span>]', 'ovis -is, <span class="etype">f.</span><br />leō -ōnis, <span class="etype">m.</span>', 'THE COW, THE SHE-GOAT, THE SHEEP, AND THE LION'],
  ['Numquam est fidelis cum potente societas: ', 'numquam/nunquam <span class="etype">adv.</span> [ne+umquam]<br />fidēlis -e [fidēs, <span class="def">trust</span>]', 'potēns, -entis [possum]<br />societās -ātis, <span class="etype">f.</span> [socius, <span class="def">sharing</span>]', 'An alliance with the powerful is never to be relied upon:'],
  ['Testatur haec fabella propositum meum.', 'testārī [testis, <span class="def">witness</span>]<br />fābella -ae, <span class="etype">f.</span> [fābula, <span class="def">narration</span>]', 'prōpositum -ī, <span class="etype">n.</span> [prō-pōnere, <span class="def">put forth</span>]', 'the present Fable testifies the truth of my maxim.'],
  ['Vacca et capella et patiens ovis iniuriae | Socii fuere cum leone in saltibus.', 'patiēns -entis [patior, <span class="def">bear</span>]<br />socius [SEC-, <span class="def">follow</span>]', 'saltus -ūs, <span class="etype">m.</span> [<span class="gk">ἄλσος</span>, <span class="def">glade</span>]', 'A Cow, a She-Goat, and a Sheep patient under injuries, were partners in the forests with a Lion.'],
  ['Hi cum cepissent cervum vasti corporis,', 'cervus -ī, <span class="etype">m.</span> [<span class="gk">κέρας</span>/cornū, <span class="def">horn</span>]<br />vāstus [VAC-, <span class="def">hollow</span>]', 'corpus -oris, <span class="etype">n.</span>', 'When they had captured a Stag of vast bulk,'],
  ['Sic est locutus, partibus factis, leo: ', 'sīc <span class="etype">adv.</span>', 'loquī -cūtus(-quūtus), <span class="etype">dep.</span> [LAC-/LOQV-, <span class="def">sound/talk</span>]', 'thus spoke the Lion, after it had been divided into shares:'],
  ['“Ego primam tollo, nominor quia leo;', 'tollere, -ō, sustulī, sublātus [TAL-/TOL-/TLA-, <span class="def">lift</span>]', 'nōmināre [nōmen]', '“Because my name is Lion, I take the first;'],
  ['Secundam, quia sum fortis, tribuetis mihi;', 'tribuere, -ō, -uī, -ūtus [tribus, <span class="def">a third part of the people</span>]', '--', 'the second you will yield to me because I am courageous;'],
  ['Tum, quia plus valeo, me sequetur tertia;', 'tum <span class="etype">adv.</span><br />plūs plūris<br />valēre, -uī, -itūrus [VAL-, <span class="def">strong</span>]', 'sequī, secūtus (-quūtus) <span class="etype">dep.</span> [SEC-, <span class="def">follow</span>]', 'then, because I am the strongest, the third will fall to my lot;'],
  ['Malo afficietur si quis quartam tetigerit”.', 'malum -ī, <span class="etype">n.</span> [malus, <span class="def">bad</span>]<br />adficere (aff-), -iō, -fēcī, -fectus [ad+facere]', 'ta<span class="wl">(n)</span>gere, -ō, tetigī, tāctus [TAG-, <span class="def">touch</span>]', 'if anyone touches the fourth, woe betide him.”'],
  ['Sic totam praedam sola improbitas abstulit.', 'tōtus, tōta, tōtum<br />praeda -ae, <span class="etype">f.</span> [prae+HED-/HEND-, <span class="def">before+seize</span>]', 'improbitās (inpr-) -ātis, <span class="etype">f.</span> [improbus]<br />auferre, abstulī, ablātus [ab+ferre]', 'Thus did unscrupulousness seize upon the whole prey for itself.']
];

var shown = 0;

function updateVoc() {
	var i = Math.floor(shown / 4);

	var j = shown % 4;
	var w0, w2;
	if (document.getElementById("efirst").checked) {
		w0 = sentences[i][3];
		w0 = w0.replace(/<br \/>\[[^\]]+\]/, '');
		w2 = sentences[i][0];
		document.getElementById("v1").className = "v3";
		document.getElementById("v3").className = "la";
	} else {
		w0 = sentences[i][0];
		w2 = sentences[i][3];
		document.getElementById("v1").className = "la";
		document.getElementById("v3").className = "v3";
	}

	if (j == 0) {
		document.getElementById('v1').innerHTML = w0;
		document.getElementById('v2').innerHTML = "";
		document.getElementById('v3').innerHTML = "";
	} else if (j == 1) {
		document.getElementById('v1').innerHTML = w0;
		document.getElementById('v2').innerHTML = sentences[i][1];
		document.getElementById('v3').innerHTML = "";
	} else if (j == 2) {
		document.getElementById('v1').innerHTML = w0;
		document.getElementById('v2').innerHTML = sentences[i][2];
		document.getElementById('v3').innerHTML = "";
	} else if (j == 3) {
		document.getElementById('v1').innerHTML = w0;
		document.getElementById('v2').innerHTML = '&nbsp;';
		document.getElementById('v3').innerHTML = w2;
	}
}

function next() {
	shown++;
	if (shown > sentences.length * 4 - 1) {
		shown = 0;
		alert('All done!');
	}
	updateVoc();
}

function prev() {
	shown--;
	if (shown < 0) {
		shown = sentences.length * 4 - 1;
		alert('All done!');
	}
	updateVoc();
}


</script>

<body onload="updateVoc()">

<h1 style="text-align:center">The Self-Instruction Latin Classic</h1>



<div class="center">

<div id="v1" class="la"></div>
<div id="v2" class="v2">&nbsp;</div>
<div id="v3" class="v3"></div>

<a href="#" class="button" id="btnprev" onclick="prev()" accesskey="p">&lt;&lt;</a>
<a href="#" class="button" id="btnnext" onclick="next()" accesskey="n">&gt;&gt;</a>


</div>
<div class="options">
<label for="efirst"><input id="efirst" name="efirst" type="checkbox" onclick="shown=0;updateVoc();"/>English First</label>
</div>

<span id="dummy"></span>
</body>
</html>
